home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / BORLAND TURBO / CHKBOOK.PAK / README.TXT < prev    next >
Encoding:
Text File  |  1997-05-06  |  5.1 KB  |  110 lines

  1.  
  2.     This is a part of the Microsoft Foundation Classes C++ library.
  3.     Copyright (C) 1992-1995 Microsoft Corporation
  4.     All rights reserved.
  5.  
  6.     This source code is only intended as a supplement to the
  7.     Microsoft Foundation Classes Reference and related
  8.     electronic documentation provided with the library.
  9.     See these sources for detailed information regarding the
  10.     Microsoft Foundation Classes product.
  11.  
  12.  
  13. -------------------------------------------------------
  14. CHKBOOK Sample Microsoft Foundation Classes Application
  15. -------------------------------------------------------
  16.  
  17. The CHKBOOK sample application primarily serves to illustrate the
  18. following Microsoft Foundation Classes features and programming
  19. techniques:
  20.  
  21.   1. Transaction-based file i/o, where the document (file) is written
  22.      to on a per transaction basis rather than on a load/save basis.
  23.  
  24.   2. Multiple views of a document, where (a) each view is of a different
  25.      CView-derived class, and (b) each view is in a separate MDI child
  26.      window.
  27.  
  28.   3. Using the CScrollView class, which supports viewing of a document
  29.      in a scrolling window.
  30.  
  31.   4. Using the CFormView class, which supports viewing of a document
  32.      using a form with controls laid out in a dialog template resource.
  33.  
  34.   5. Implementing page breaks during printing.
  35.  
  36.   6. Writing custom data exchange and validation (DDX/V) functions.
  37.  
  38.   7. Using a private INI file to automatically open a document
  39.      when the application is started.
  40.  
  41.   8. Using Registry entries to define a specific icon for a data file, and to
  42.      allow running the application by double-clicking on the data file.
  43.  
  44. The CHKBOOK sample illustrates the above using the following user interface:
  45.  
  46.   * The CHKBOOK sample is a single document application in
  47.     the sense that it only allows only one checkbook file to be open at a
  48.     time.  But CHKBOOK uses MDI features of MFC to provide multiple views
  49.     of the document via views in separate MDI child windows.  To enforce
  50.     that only one document is open at a time, we simply remove the File
  51.     New and File Open commands from the menus and toolbars of the MDI
  52.     children, which represent an already opened document.
  53.  
  54.   * The two views of the document are a check view and a book view.  The
  55.     check view, implemented in class CCheckView, provides a form for
  56.     entering or viewing the data for a single check.  The book view,
  57.     implemented in CBookView, provides a scrolling window showing a
  58.     summary of each check.
  59.  
  60.   * The CHKBOOK application supports the concept of current selection.
  61.     The user can change the current selection in the book view by using
  62.     up and down arrow keys, and by clicking a check with the mouse.
  63.     The second check view always shows the current selection in the
  64.     book view.
  65.  
  66.   * The check amount field in the check form view validates and converts
  67.     a textual representation such as "19.98" to an internal DWORD
  68.     representation.  The use of DWORD facilitates money arithmetic
  69.     better than, for example, floating point.  CHKBOOK happens to not
  70.     do money arithmetic, but it easily could, for example, add up all
  71.     the check amounts and display it on a bottom line.
  72.  
  73.   * The check view shows an English text presentation of the check amount,
  74.     such as "Nineteen and 98/100ths Dollars" as the user types along in the
  75.     numeric field.
  76.  
  77. The CHKBOOK sample has several simplifcations in order to keep the code
  78. focused on the above MFC features and techniques the sample is designed
  79. to illustrate.  For example:
  80.  
  81.   * CHKBOOK supports only checks and no other money transactions such
  82.     as deposits.  CHKBOOK does not support the deletion (voiding) of
  83.     checks.  The check data is written using fixed length records rather
  84.     than using a more space-efficient variable length records.  These
  85.     simplications allow the CChkBookDoc class to access individual
  86.     check records according to the following very simple algorithm.
  87.     The location of the check is equal the length of the file header,
  88.     plus the <n> times the fixed length of a check record, where <n>
  89.     is the number of sequentially issued checks before this one.
  90.     The reusable class CFixedLenRecDoc implements the
  91.     behavior of a fixed-length record document, separately from the
  92.     the details about the particular check document, which is implemented
  93.     in the a CChkBookDoc class derived from CFixedLenRecDoc.  Similarly,
  94.     the reusable class CRowView implements the behavior of a scroll view
  95.     that rows of fixed heights.  The class CCheckView, derived from
  96.     CRowView, implements the details about the row-based scroll view
  97.     that are particular to the check book application.
  98.  
  99.   * CHKBOOK does not fully support resource-based localization to
  100.     other languages.  In particular, the check amount field assumes
  101.     dollar and cents, and the written-out check amount ("Nineteen
  102.     and 98/100ths Dollars") is displayed in English.
  103.  
  104.   * CHKBOOK supports a limited number of checks, equal to the 32K
  105.     devided by the pixel height of text on the display or printer.
  106.  
  107.   * CHKBOOK.REG must be edited to include the full path to CHKBOOK.EXE 
  108.     wherever it appears. Once that is done, double clicking on the 
  109.     CHKBOOK.REG icon merges the entries into the registration database.
  110.